package com.huifaapp.mall.activity;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

import com.google.gson.Gson;
import com.huifaapp.mall.R;
import com.huifaapp.mall.bean.GymineBean;
import com.squareup.okhttp.Request;
import com.zhy.http.okhttp.OkHttpUtils;
import com.zhy.http.okhttp.callback.StringCallback;

public class GymineActivity extends AppCompatActivity {

    private TextView tv_Gymy;
    private ImageView im_back;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_gymine);
        initView();
    }

    private void initView() {
        tv_Gymy = (TextView) findViewById(R.id.guanyuwomen);
        im_back = (ImageView) findViewById(R.id.Gvmine_back);
        im_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        OkHttpUtils.get().url("http://develop.jhjvip.cn:8080/mall/mobile/project/about")
                .build()
                .execute(new StringCallback() {
                    @Override
                    public void onError(Request request, Exception e) {

                    }

                    @Override
                    public void onResponse(String response) {
                        Gson gson = new Gson();
                        GymineBean gymineBean = gson.fromJson(response,GymineBean.class);
                        tv_Gymy.setText(gymineBean.getData());
                    }
                });


    }
}
